A PIN (P-intrinsic-N) diode is a type of diode. For example, in the PIN diode, a lightly doped N-type semiconductor substrate is sandwiched between a lightly doped P-type semiconductor region as an anode region and a heavily doped N-type semiconductor region as a cathode region. In a power switching element such as a diode, a guard ring is formed around the element to improve voltage breakdown resistance. The guard ring has a multiple-ring structure of a heavily doped P-type semiconductor region. In this type of element, holes that are injected from the heavily doped region around the element are likely to be excessively accumulated around the element. As a result, the element may be broken due to a reduction in a recovery capability around the element. A semiconductor device having an IGBT and a diode that are formed adjacent to each other in a common semiconductor substrate has been known. In this type of device, a lot of holes are injected from a P-type region (e.g., channel region, body region) of the IGBT to the P-type anode region of the diode. As result, it is difficult to reduce a recovery loss of the diode. In JP-A-2001-196606 corresponding to U.S. Pat. No. 6,552,413, JP-A-2-66977, and JP-A-59-49711, the P-type region is distributed in the cathode region of the diode so that the holes can be absorbed by the P-type region. However, when a lot of holes are injected from the guard ring or the IGBT, it is difficult to completely absorb the holes by the P-type region.